Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify template generation and handling #3683

Merged
merged 1 commit into from
Feb 28, 2017

Conversation

ruflin
Copy link
Contributor

@ruflin ruflin commented Feb 27, 2017

  • Only one file is passed instead of an array as now only file is needed. Introduce -file param.
  • Local loading of beats version was removed as it can lean to cyclic imports
  • Move _meta/fields.full.generated.yml to fields.yml in preparation for packaging fields.yml and ignore it in git
  • Cleanup Template generation package
  • Rename -beat.name param to -index as this describes it better

Part of #3654

}
existingFiles = append(existingFiles, f)
if _, err := os.Stat(*file); err != nil {
fmt.Fprintf(os.Stderr, "Input -file does not exist: %s", *file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os.Stat could fail for reasons other than the file does not exists. You can test for that specific case with os.IsNotExist or maybe you could just include the error message from stat in the output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will just include the error, because i think all errors should be covered.

* Only one file is passed instead of an array as now only file is needed. Introduce `-file` param.
* Local loading of beats version was removed as it can lean to cyclic imports
* Move `_meta/fields.full.generated.yml` to `fields.yml` in preparation for packaging `fields.yml` and ignore it in git
* Cleanup Template generation package
* Rename -beat.name param to -index as this describes it better

Part of elastic#3654
@andrewkroh andrewkroh merged commit 80c8cd0 into elastic:master Feb 28, 2017
@ruflin ruflin deleted the simplify-template branch February 28, 2017 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants